<template>
  <div />
</template>

<script>
import { setToken } from '@/utils/auth'

export default {
  name: 'OpenLogin',
  data() {
    return {
    }
  },
  created() {
    const { adminToken, path } = this.$route.query
    if (adminToken) {
      setToken(adminToken)
      this.$router.push({ path: path || '/' })
    } else {
      this.$router.push({ path: '/login' })
    }
  }
}
</script>

<style lang="scss" scoped>
.home-container {
  margin: 30px;
  .welcome-text{
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
